package com.hzqy.persistence.dao.epg;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.AcWinningVo;
import com.hzqy.web.vo.epg.AcTicketNumVo;
import com.hzqy.web.vo.epg.AcUserBillVo;
import com.hzqy.web.vo.epg.ActivityProductVo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class AcLotteryDao extends PersistenceDao<AcWinningVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	public Integer selectAcCount(AcWinningVo ac){
        return getSqlSession().selectOne(this.getNamespace()+"selectAcCount",ac);
    }

	/**
	* 动态查询信息传递实体为参数
	* */
	public List<AcWinningVo> selectByRequest(AcWinningVo alv){
       return getSqlSession().selectList(this.getNamespace()+"selectByRequest",alv);
	}

	/**
	*  查询一定量的数据信息
	* */
	public List<AcWinningVo> selectAc(Map param){
	 return getSqlSession().selectList(this.getNamespace() + "selectAcLottery",param);
	}

	/**
	 *  插入数据信息
	 * */
	public Integer insertAcWinningList(Map map){
		return getSqlSession().insert(this.getNamespace()+"insertAcWinningList",map);
	}
	/**
	 *  根据id查询
	 * @return
	 */
	public AcWinningVo selectAcWinningById(int f_awl_id) {
		return getSqlSession().selectOne(this.getNamespace() + "selectAcWinningById",f_awl_id);
	}
	/**
	 * 根据id修改
	 * @param awv
	 * @return
	 */
	public int updateAcWinning(AcWinningVo awv){
		return getSqlSession().update(this.getNamespace() + "updateAcWinning",awv );
	}
	/**
	 * 根据id删除
	 * @param aub
	 * @return
	 */
	public int deleteAcWinning(int f_awl_id) {
		return getSqlSession().delete(this.getNamespace() + "deleteAcWinning", f_awl_id);
	}

}
